<template>
	<view>
		<uni-titles :title="'种植作物'"></uni-titles>
		<uni-tudwhere></uni-tudwhere>
		<uni-onlytitlelist :title="'地块信息'"  >
			<view class="foundationTtem fs-24" :class="'foundationTtem' + d.choose" v-for="(d, index) in list" :key="d.id">
				<view class="name">{{ d.name }}</view>
				<view class="text">{{ d.text }}</view>
				<view class="type">{{ d.type }}</view>
			</view>
		</uni-onlytitlelist>
		<uni-onlytitlelist :title="'种植配置'"  >
			<view class="warningbox fs-24 mar-top18">
				<view class="toptext">
					<u--image :mode="'aspectFill'" :src="warningIcon" width="30rpx" height="30rpx"></u--image>
					<view class="mar-left6">注意：</view>
				</view>
				<view class="mar-top10">种植作物修改前，请确认该地块种植的作物，已全部清理！</view>
			</view>
			<uni-inputs :title="'作物名称'" :placeholder="'请选择需要种植的作物'" icon readonly :margin="[30, 0, 30, 0]"></uni-inputs>
			<uni-inputs :title="'作物品种'" :placeholder="'作物的品质如爱媛3号'" :margin="[30, 0, 30, 0]"></uni-inputs>
			<uni-inputs :title="'种植时间'" :placeholder="'选择具体的种植时间'" icon readonly :margin="[30, 0, 30, 0]"></uni-inputs>
		</uni-onlytitlelist>
		<uni-lastbtn :text="'保存'" @btnfun="btnfun"></uni-lastbtn>
	</view>
</template>

<script>
export default {
	data() {
		return {
			warningIcon:
				'',
			list: [
				{
					name: '地块名称',
					text: '番茄园地',
					
				},
				{
					name: '地块类型',
					text: '大棚',
					choose: 'dklx'
				},
				{
					name: '种植地址',
					text: '天府广场种植园'
				}
			]
		};
	},
	methods:{
		btnfun(d){
			console.log(d);
			if(d=='取消'){
				uni.navigateBack({
					delta:1
				})
			}else if(d=='保存'){
				uni.showToast({
					title:'保存成功',
					icon:'none'
				})
				setTimeout(()=>{
					uni.navigateBack({
						delta:1,
					})
				},1000)
			}
		}
	}
};
</script>

<style lang="scss">
page {
	background: #f6f6f6;
}
.warningbox {
	color: #ff7b11;
	.toptext {
		display: flex;
		align-items: center;
	}
}
</style>
